<?php drupal_add_css(drupal_get_path('theme', 'nobel') . '/css/styles.css', array('group' => CSS_THEME)); ?>
<style type="text/css">
  .form_control input {
    height: 37px;
    padding: 0 3%
  }

  select {
    background-color: #fff;
    background-position: right center;
    background-repeat: no-repeat;
    border: 1px solid #888;
    border-radius: 3px;
    box-sizing: border-box;
    font: 12px/1.5 Tahoma, Arial, sans-serif;
    height: 30px;
    padding: 0 4px;
  }
</style>

<main id="content" role="main">
  <input type="hidden" name="timezone" value="Asia/Shanghai">
  <?= drupal_render($form['form_build_id']) ?>
  <?= drupal_render($form['form_id']) ?>

  <div class="container clearfix">
    <div class="top-notification"></div>
    <div class="main col1-layout no-title">
      <div class="col-main">
        <div class="col-main-wrap">
          <div class="page-title mod mod-headline">
            <h1 class="b">注册成为Nobel Biocare会员</h1>
            <h5 class="b"></h5>
          </div>

          <!-- registered customers -->
          <div class="rows clearfix">
            <div class="pull-left login-l col_5 col_12-xs">
              <div class="required-block"><p class="required">* 必填字段</p></div>
              <form class="b" method="post" id="register-form" novalidate="novalidate">
                <ul class="form-list">
                  <li class="form_control">

                    <label for="username" class="required">手机号码 *</label>
                    <div class="input-box">
                      <input maxlength="11" autocomplete="off" class="required input-text <?php if (!empty(form_get_errors()['name'])) { ?> error<?php } ?>"
                             value="<?= $form['account']['name']['#value'] ?>" type="text" id="edit-name" name="name" tabindex="1">
                    </div>
                    <?php if (!empty(form_get_errors()['name'])) { ?><span id="edit-name-error" class="error"><?= form_get_errors()['name'] ?></span><?php } ?>
                    <div class="name_error"></div>
                  </li>

                  <li class="form_control" id="picture_code_box" style="display: none">
                    <div class="input-box">
                      <input maxlength="4" placeholder="请输入图形验证码" style="width: 200px;" autocomplete="off" class="input-text" value="" type="text" id="picture_code" name="picture_code" tabindex="1">
                      <img id="verify_code" style="cursor: pointer" src="<?= url('/picture/verify/code') ?> ?>" onclick="this.src='<?= url('/picture/verify/code') ?>?'+new Date().getTime();">
                    </div>
                  </li>

                  <li class="form_control">
                    <label for="phone_code" class="required">请输入验证码 *</label>
                    <div class="input-box">
                      <input style="width: 200px;" autocomplete="off"
                             class="required input-text <?php if (!empty(form_get_errors()['phone_code'])) { ?> error<?php } ?>"
                             value="<?= !empty($_POST['phone_code']) ? $_POST['phone_code'] : '' ?>" type="text" id="phone_code" name="phone_code"
                             tabindex="1">
                      <button id="sendPhoneCodeBtn" style="border: 1px solid #CCC;padding: 9px; 10px;cursor: pointer">获取验证码</button>
                    </div>
                    <?php if (!empty(form_get_errors()['phone_code'])) { ?><span id="edit-name-error" class="error"><?= form_get_errors()['phone_code'] ?></span><?php } ?>
                  </li>

                  <li class="form_control">
                    <label for="name" class="required">姓名 *</label>
                    <div class="input-box">
                      <input class="required input-text" autocomplete="off" value="<?= $form['field_realname']['und'][0]['value']['#value'] ?>" type="text" id="edit-field-realname-und-0-value" name="field_realname[und][0][value]"
                             tabindex="1">
                    </div>
                  </li>

                  <li class="form_control">
                    <label for="email" class="required">邮箱 *</label>
                    <div class="input-box">
                      <input autocomplete="off" class="required input-text <?php if (!empty(form_get_errors()['mail'])) { ?> error<?php } ?>" value="<?= $form['account']['mail']['#value'] ?>" type="text" id="edit-mail" name="mail" tabindex="1">
                    </div>
                    <?php if (!empty(form_get_errors()['mail'])) { ?><span id="edit-name-error" class="error"><?= form_get_errors()['mail'] ?></span><?php } ?>
                  </li>

                  <li class="form_control">
                    <label for="company" class="required">工作单位 *</label>
                    <div class="input-box">
                      <input autocomplete="off" class="required input-text" value="<?= $form['field_company']['und'][0]['value']['#value'] ?>" type="text" id="edit-field-company-und-0-value" name="field_company[und][0][value]" tabindex="1">
                    </div>
                  </li>

                  <li class="form_control">
                    <label for="password" class="required">密码 *</label>
                    <div class="input-box">
                      <input class="required input-text" value="<?= $form['account']['pass']['#value']['pass1'] ?>" type="password" id="edit-pass-pass1" name="pass[pass1]">
                    </div>
                  </li>
                  <li class="form_control">
                    <label for="confirmPassword" class="required">确认密码 *</label>
                    <div class="input-box">
                      <input class="required input-text" value="<?= $form['account']['pass']['#value']['pass2'] ?>" type="password" id="edit-pass-pass2" name="pass[pass2]">
                    </div>
                  </li>

                  <li class="form_control">
                    <input class="input-text" value="" type="hidden" id="field_city" name="field_city[und][0][value]">
                    <label for="city" class="required">所在省市</label>
                    <div class="input-box" id="city_1">
                      <select class="prov"></select>
                      <select class="city" disabled="disabled"></select>
                    </div>
                  </li>

                  <li class="form_control">
                    <div class="buttons-set form-buttons btn-only">
                      <button type="submit" class="button colored" name="send" id="send2">
                        <span>注册</span>
                      </button>
                    </div>
                  </li>

                </ul>
              </form>
              <!-- end registered customers -->
            </div>
            <div class="pull-right login-r col_5 col_12-xs">
              <div class="pad-left-40 m-static-block">
                <h3 class="b mrg-btm-10">已经有帐号了？</h3>
                <p><a class="button button2" href="<?= !empty($_GET['destination']) && drupal_valid_path($_GET['destination']) && $_GET['destination'] !='user/login' && $_GET['destination'] !='user/login' ? url('user/login', array('query' => array('destination' => $_GET['destination']))) : url('user/login') ?>">立即登录</a></p>
              </div>
            </div>
          </div>

        </div>
      </div>
    </div>
  </div>
</main>
